package cn.sc.allinpay.allfavour.module.device;

import android.content.Context;

import com.landicorp.android.eptapi.DeviceService;
import com.landicorp.android.eptapi.exception.ReloginException;
import com.landicorp.android.eptapi.exception.RequestException;
import com.landicorp.android.eptapi.exception.ServiceOccupiedException;
import com.landicorp.android.eptapi.exception.UnsupportMultiProcess;

/**
 * 设备主控登录
 *
 * @author pany
 */
public class DeviceLogin {

    public static void logout() {
        DeviceService.logout();
    }

    public static void login(Context context) {
        try {
            DeviceService.login(context);
        } catch (RequestException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (ServiceOccupiedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (ReloginException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (UnsupportMultiProcess e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
}
